package com.oyyh.lawyermanager.service;

import com.oyyh.lawyermanager.entity.Lawyer;

import java.util.List;

/**
 * 律师档案业务接口
 *
 * @author 欧阳远辉
 * @version 1.0
 */
public interface LawyerService {
    /**
     * 添加律师
     *
     * @param lawyer 律师对象
     * @return 添加成功返回1，失败返回0
     */
    int addLawyer(Lawyer lawyer);

    /**
     * 查询所有律师记录
     *
     * @return 包含所有律师信息的列表
     */
    List<Lawyer> selectAllLawyer();

    /**
     * 根据律师id删除律师记录
     *
     * @param lawyerId 律师id
     * @return 删除成功返回1，失败返回0
     */
    int delLawyer(int lawyerId);

    /**
     * 根据律师编号查询律师信息
     *
     * @param lawyerId 律师编号
     * @return 编号对应的律师对象
     */
    Lawyer selectLawyerById(int lawyerId);

    /**
     * 修改律师信息
     * @param lawyer 需要被修改的律师对象
     * @return 修改成功返回1；失败返回0
     */
    int modifyLawyer(Lawyer lawyer);
}
